<?php

class Salonxfoto extends MY_Model {
 
    function Salonxfoto()
    {
        // Call the Model constructor
        parent::MY_Model();

	$this->nombreTabla = "salonxfoto";
	$this->idT1= "idFoto";

	//$this->nombreCampo="nombre";

		$this->campos[] = array("realname" => "idSalon",
					"clase" => "opciones",
					"label" => "Salon",
					"modelo" => "salon",
					"rules" => "required|integer");

		$this->campos[] = array("realname" => "direccion",
					"clase" => "file",
					"label" => "Foto",
					"types" => "gif|jpg|png|bmp|jpeg",
					"achicar" => array("600","450"),
					"rules" => "");

		$this->campos[] = array("realname" => "numero",
					"clase" => "text",
					"label" => "Número",
					"rules" => "required|integer");
    }
     


	function modificarPos()
	{
		$aux=array();		
		$data=array();
		$data['x_pos']=$this->input->post('x_pos');
		$data['y_pos']=$this->input->post('y_pos');

		$this->db->where($this->idT1,  $this->input->post($this->idT1) );
		$this->db->update($this->nombreTabla, $data);
		
		return $aux;
	}

}

?>
